home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / gfx / fu1_62.lha / fu / Rexx / anim2.rexx < prev    next >
OS/2 REXX Batch file  |  1995-03-25  |  1KB  |  63 lines

  1. /* FU Arexxtester */
  2.  
  3. options results
  4.  
  5. ADDRESS REXX_FU
  6.  
  7. say 'FU-ArexxAnim2';say;
  8.  
  9. SetIter '500';
  10. if RC~=0 then call AppError('SetIter',RC);
  11.  
  12. xs1=-1.77993697;ys1=-0.0166376552;xs2=-1.7469221245;ys2=0.0166376552
  13. xe1=-1.7863294368;ye1=-0.0003070386;xe2=-1.7857169573;ye2=0.0003070386
  14.  
  15. frames=50
  16. x1step=(xe1-xs1)/frames
  17. x2step=(xe2-xs2)/frames
  18. y1step=(ye1-ys1)/frames
  19. y2step=(ye2-ys2)/frames
  20.  
  21. say 'Steps      : ' x1step y1step x2step y2step;
  22.  
  23. do i=0 to frames
  24.     name='xh3:frames/MANDELZOOM.'right(i,3,'0');
  25.     say 'Working on : ' name;
  26.     say 'Zoom       : ' xs1 ys1 xs2 ys2;
  27.  
  28.     SetZoom xs1 ys1 xs2 ys2;
  29.     if RC~=0 then call AppError('SetZoom',RC);
  30.  
  31.     RenderPicture;
  32.     if RC~=0 then call AppError('RenderPicture',RC);
  33.  
  34.     SavePicture name '2'
  35.     if RC~=0 then call AppError('SavePicture',RC);
  36.  
  37.     xs1=xs1+x1step;
  38.     xs2=xs2+x2step;
  39.     ys1=ys1+y1step;
  40.     ys2=ys2+y2step;
  41. end
  42.  
  43. ActivateFU;
  44. if RC~=0 then call AppError('ActivateFU',RC);
  45.  
  46. ExitFU;
  47. if RC~=0 then call AppError('ExitFU',RC);
  48.  
  49. exit
  50.  
  51. AppError:procedure
  52.     cmd=arg(1);
  53.     ret=arg(2);
  54.     say 'Application Error';say;
  55.     say 'Command 'cmd' failed with Returncode 'ret;
  56.     select
  57.         when ret='1' then say '    => unknown command';
  58.         when ret='2' then say '    => unknown parameter';
  59.         otherwise say '    => unknown returncode';
  60.     end
  61.     say;
  62. return
  63.